﻿@{
    // list comments
    // init vars
    dynamic Comments;
    // set view
    var View = "~/Views/Admin/_ListAllComments.cshtml";
    // get articleid
    var ArticleId = UrlData[0];
    if(String.IsNullOrEmpty(ArticleId)){
        //if no articleId
        Comments = Blog.DataObject.GetAllComments();
    }else{
        //if article id
        Comments = Blog.DataObject.GetAllCommentsByArticleId(ArticleId);
    }
@RenderPage(View,new{Comments=Comments});  
}